package cn.itcast.mq.service;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Service;

@Service
public class ProviderService {

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void send() {
        rocketMQTemplate.convertAndSend("topic1", "消息体");
    }
}
